Grid method adds a grid to a graph in matplotlib